﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TrackingList.ascx.cs" Inherits="Lenovo.CFI.Web.VP.TrackingList" %>
<tbwc:StyleSheetControl ID="SscList" runat="server" CssPath="list.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SscAc" runat="server" CssPath="VP/autocomplete.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SccDialogs" runat="server" CssPath="modaldialogs.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SscThis" runat="server" CssPath="VP/tracking/trackinglist.css"></tbwc:StyleSheetControl>
<ajaxToolkit:ToolkitScriptManager runat="Server" EnablePartialRendering="true" CombineScripts="false" ID="ScriptManager1" />

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <div id="relatedoperation">
            <span class="op">Topic:<asp:DropDownList ID="DdlTopic" runat="server" AutoPostBack="true"
                Width="16em" onselectedindexchanged="DdlTopic_SelectedIndexChanged"></asp:DropDownList></span>
            <span class="op">E-Status:<asp:DropDownList ID="DdlEStatus" runat="server" AutoPostBack="true"
                Width="16em" onselectedindexchanged="DdlEStatus_SelectedIndexChanged">
                <asp:ListItem Text="Select..." Value="-1"></asp:ListItem>
                <asp:ListItem Text="New" Value="0"></asp:ListItem>
                <asp:ListItem Text="Preparing" Value="1"></asp:ListItem>
                <asp:ListItem Text="OnGoing" Value="2"></asp:ListItem>
                <asp:ListItem Text="Finished" Value="3"></asp:ListItem>
                <asp:ListItem Text="Canceled" Value="4"></asp:ListItem>
            </asp:DropDownList></span>
        </div>
        <div class="dataListArea">
            <tbwc:GridViewEx ID="GvList" runat="server" SkinID="List" DataKeyNames="ID" 
                AllowPaging="true" PageSize="10"
                OnRowDataBound="GvList_RowDataBound" OnRowCommand="GvList_RowCommand" 
                onpageindexchanging="GvList_PageIndexChanging">
                <Columns>
                    <asp:TemplateField HeaderText="No.">
                        <itemtemplate><asp:Literal ID="LtrNo" runat="server"></asp:Literal></itemtemplate>
                        <ItemStyle CssClass="listNo" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Idea Name">
                        <itemtemplate><asp:Literal ID="LtrTitle" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="title" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Author">
                        <itemtemplate><asp:Literal ID="LtrOwner" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="owner" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Type">
                        <itemtemplate><asp:Literal ID="LtrType" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="type" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="NextAction">
                        <itemtemplate><asp:Literal ID="LtrNextAction" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="nextaction" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="IP">
                        <itemtemplate><asp:Literal ID="LtrNextIP" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="ip" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="E-Status">
                        <itemtemplate><asp:Literal ID="LtrEStatus" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="status" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText=" ">
                        <ItemTemplate><asp:ImageButton 
                            ID="BtnEdit" runat="server" CausesValidation="False" CommandName="OpenEdit"
                                SkinID="ListEdit" CommandArgument='<%# Eval("ID")%>' /></ItemTemplate>
                        <ItemStyle CssClass="listOp" />
                    </asp:TemplateField>
                </Columns>
            </tbwc:GridViewEx>
        </div>

        <asp:Button ID="BtnHiddenEdit" runat="Server" Style="display: none" />
        <ajaxToolKit:ModalPopupExtender ID="MpeExecution" runat="server" TargetControlID="BtnHiddenEdit"
            PopupControlID="PnlExecution" CancelControlID="BtnCancel" BackgroundCssClass="modalBackground"
            PopupDragHandleControlID="PnlExecutionCaption" Drag="false">
        </ajaxToolKit:ModalPopupExtender>
        <asp:Panel ID="PnlExecution" runat="server" CssClass="modalBox detail" Style="display: none;" Width="480px">
            <asp:Panel ID="PnlExecutionCaption" runat="server" CssClass="caption" Style="margin-bottom: 10px; cursor: hand;">
                Execution</asp:Panel>
                <asp:PlaceHolder ID="PhAction" runat="server">
                    <div id="DivProjectName" runat="server"><asp:Label ID="LblProjectName" runat="server" AssociatedControlID="TxtProjectName" Text="Project Name:" CssClass="title"></asp:Label><asp:TextBox 
                        ID="TxtProjectName" runat="server" Width="10em"></asp:TextBox></div>
                    <div id="DivProjectTime" runat="server"><asp:Label ID="LblProjectTime" runat="server" AssociatedControlID="DpProjectTime" Text="KickOff Time:" CssClass="title"></asp:Label><tbwc:DatePicker 
                        ID="DpProjectTime" runat="server" Width="8.5em" /></div>
                    
                    <div id="DivOtherBuNextAction" runat="server"><asp:Label ID="LblOtherBuNextAction" runat="server" AssociatedControlID="DdlOtherBuNextAction" Text="Suggestion" CssClass="title"></asp:Label><asp:DropDownList 
                        ID="DdlOtherBuNextAction" runat="server"></asp:DropDownList></div>
                    
                    <div><asp:Label ID="LblProjectStatus" runat="server" AssociatedControlID="DdlProjectStatus" Text="Action Status:" CssClass="title"></asp:Label><asp:DropDownList 
                        ID="DdlProjectStatus" runat="server">
                            <asp:ListItem Text="Preparing" Value="1"></asp:ListItem>
                            <asp:ListItem Text="OnGoing" Value="2"></asp:ListItem>
                            <asp:ListItem Text="Finished" Value="3"></asp:ListItem>
                            <asp:ListItem Text="Canceled" Value="4"></asp:ListItem>
                        </asp:DropDownList></div>

                    <div><asp:Label ID="LblActionComment" runat="server" AssociatedControlID="TxtActionComment" Text="Action Comment" CssClass="title"></asp:Label><asp:TextBox 
                        ID="TxtActionComment" runat="server" Width="20em" TextMode="MultiLine" Rows="3"></asp:TextBox></div>
                </asp:PlaceHolder>
                
                <asp:PlaceHolder ID="PhIP" runat="server">
                    <div><asp:Label ID="LblIPNo" runat="server" AssociatedControlID="TxtIPNo" Text="IP No:" CssClass="title"></asp:Label><asp:TextBox 
                        ID="TxtIPNo" runat="server" Width="10em"></asp:TextBox></div>
                    <div><asp:Label ID="LblIPStatus" runat="server" AssociatedControlID="DdlIPStatus" Text="IP Status:" CssClass="title"></asp:Label><asp:DropDownList 
                        ID="DdlIPStatus" runat="server">
                            <asp:ListItem Text="Preparing" Value="1"></asp:ListItem>
                            <asp:ListItem Text="OnGoing" Value="2"></asp:ListItem>
                            <asp:ListItem Text="Finished" Value="3"></asp:ListItem>
                            <asp:ListItem Text="Canceled" Value="4"></asp:ListItem>
                        </asp:DropDownList></div>
                    <div><asp:Label ID="LblIPComment" runat="server" AssociatedControlID="TxtIPComment" Text="IP Comment:" CssClass="title"></asp:Label><asp:TextBox 
                        ID="TxtIPComment" runat="server" Width="20em" TextMode="MultiLine" Rows="3"></asp:TextBox></div>
                </asp:PlaceHolder>

            <div style="white-space: nowrap; text-align: center; margin-top:2em;">
		        <asp:Button ID="BtnSave" runat="server" Text="Save" OnClick="BtnSave_Click" CausesValidation="true"/>
		        <asp:Button ID="BtnCancel" runat="server" CausesValidation="false" Text="Cancel"/>
	        </div>
        </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>